    package com.appspot.android2gather.server;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.appspot.android2gather.activity.ErrorMessage;
import com.google.gson.Gson;


public class NullServlet
    extends HttpServlet
{

    private static Gson gson = new Gson();
    private static final long serialVersionUID = -8094312384661648642L;

    @Override
    protected void service( HttpServletRequest req, HttpServletResponse resp )
        throws ServletException, IOException
    {
        resp.getWriter().println(gson.toJson( new ErrorMessage("Invalid request."), ErrorMessage.class ));
    }
}
